class Student{
    public String name;
    public int age;
    public String sex;

    public void doClass(){
        System.out.println("去上课！");
    }
}

class WashMachine{
    public String brand; // 品牌
    public String type; // 型号
    public double weight; // 重量
    public double length; // 长
    public double width; // 宽
    public double height; // 高
    public String color;  // 颜色

    public void washClothes(){ // 洗衣服
        System.out.println("洗衣功能");
    }

    public void dryClothes(){// 脱水
        System.out.println(brand+"脱水功能");
    }

    public void setTime(){// 定时
        System.out.println("定时功能");
    }

    /*public static void main(String[] args) {
        System.out.println("洗衣机main方法");
    }*/
}

public class tese2 {

    /**
     * 可以通过对象的引用和点号来访问成员变量和成员属性
     * @param args
     */
   public static void main(String[] args) {
        System.out.println("test2main方法");

       WashMachine washMachine=new WashMachine();
       washMachine.brand="海尔";
       washMachine.dryClothes();
       System.out.println( washMachine.brand);
       //引用.方法/成员变量

       WashMachine washMachine2=new WashMachine();
       washMachine2.brand="美的";
       washMachine2.dryClothes();
       System.out.println( washMachine2.brand);
    }
}
